﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>Door: StateForge::Examples::Door::Door Class Reference</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                C# examples using state machines generated by StateBuilderDotNet
            </h1>
            <h3>
                Door: StateForge::Examples::Door::Door Class Reference
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespace_state_forge.html">StateForge</a>      </li>
      <li class="navelem"><a class="el" href="namespace_state_forge_1_1_examples.html">Examples</a>      </li>
      <li class="navelem"><a class="el" href="namespace_state_forge_1_1_examples_1_1_door.html">Door</a>      </li>
      <li class="navelem"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html">Door</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">StateForge::Examples::Door::Door Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="StateForge::Examples::Door::Door" -->
<p><a href="class_state_forge_1_1_examples_1_1_door_1_1_door-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1d1db69204a3e15f8d5641c9b4355a14">Door</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a7dc299d9d93cfc77011d8be94911431e">Door</a> (<a class="el" href="interface_state_forge_1_1_examples_1_1_door_1_1_i_engine.html">IEngine</a> engine)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#ae0622c55ef8fa938c7d366e720a49a81">Test01</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_state_forge_1_1_examples_1_1_door_1_1_i_engine.html">IEngine</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">Engine</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">DoorContext&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">context</a></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a0931a283fe2db04ca65921ad46f5e42d">InitializeContext</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#ac838c3ea454fabe9b5b58fbd494d5892">StateMachineEnd</a> (object sender, EventArgs e)</td></tr>
<tr><td colspan="2"><h2><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8bcedc32e4db10d3ef2f7550d1822917">Main</a> (string[] args)</td></tr>
<tr><td colspan="2"><h2><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static readonly string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a24d411751e88c5c040dbe8e8871b08b8">traceName</a> = &quot;Door&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static TraceSource&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a4f2f10ac2ce1457df395fd9411326eed">ts</a> = new TraceSource(<a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a24d411751e88c5c040dbe8e8871b08b8">traceName</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static AutoResetEvent&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1f63da8ffc39975ec290adf9f25f422e">autoResetEvent</a> = new AutoResetEvent(false)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_door_8cs_source.html#l00035">35</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1d1db69204a3e15f8d5641c9b4355a14"></a><!-- doxytag: member="StateForge::Examples::Door::Door::Door" ref="a1d1db69204a3e15f8d5641c9b4355a14" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StateForge::Examples::Door::Door::Door </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00044">44</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">Engine</a> = <span class="keyword">new</span> <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">Engine</a>();
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a0931a283fe2db04ca65921ad46f5e42d">InitializeContext</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a7dc299d9d93cfc77011d8be94911431e"></a><!-- doxytag: member="StateForge::Examples::Door::Door::Door" ref="a7dc299d9d93cfc77011d8be94911431e" args="(IEngine engine)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">StateForge::Examples::Door::Door::Door </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interface_state_forge_1_1_examples_1_1_door_1_1_i_engine.html">IEngine</a>&#160;</td>
          <td class="paramname"><em>engine</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00050">50</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">Engine</a> = engine;
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a0931a283fe2db04ca65921ad46f5e42d">InitializeContext</a>();
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0931a283fe2db04ca65921ad46f5e42d"></a><!-- doxytag: member="StateForge::Examples::Door::Door::InitializeContext" ref="a0931a283fe2db04ca65921ad46f5e42d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void StateForge::Examples::Door::Door::InitializeContext </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00056">56</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">context</a> = <span class="keyword">new</span> DoorContext(<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">Engine</a>);
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">context</a>.Observer = ObserverTrace.Instance(<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a24d411751e88c5c040dbe8e8871b08b8">traceName</a>);
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">context</a>.EndHandler += <span class="keyword">new</span> EventHandler&lt;EventArgs&gt;(<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#ac838c3ea454fabe9b5b58fbd494d5892">StateMachineEnd</a>);
            this.<a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">context</a>.EnterInitialState();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a8bcedc32e4db10d3ef2f7550d1822917"></a><!-- doxytag: member="StateForge::Examples::Door::Door::Main" ref="a8bcedc32e4db10d3ef2f7550d1822917" args="(string[] args)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void StateForge::Examples::Door::Door::Main </td>
          <td>(</td>
          <td class="paramtype">string[]&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td><code> [inline, static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00078">78</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            var door = <span class="keyword">new</span> <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1d1db69204a3e15f8d5641c9b4355a14">Door</a>();
            door.Test01();
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a4f2f10ac2ce1457df395fd9411326eed">ts</a>.TraceInformation(<span class="stringliteral">&quot;Door has ended&quot;</span>);
            Environment.Exit(0);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ac838c3ea454fabe9b5b58fbd494d5892"></a><!-- doxytag: member="StateForge::Examples::Door::Door::StateMachineEnd" ref="ac838c3ea454fabe9b5b58fbd494d5892" args="(object sender, EventArgs e)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void StateForge::Examples::Door::Door::StateMachineEnd </td>
          <td>(</td>
          <td class="paramtype">object&#160;</td>
          <td class="paramname"><em>sender</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">EventArgs&#160;</td>
          <td class="paramname"><em>e</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00064">64</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a4f2f10ac2ce1457df395fd9411326eed">ts</a>.TraceInformation(<span class="stringliteral">&quot;State machine has ended&quot;</span>);
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1f63da8ffc39975ec290adf9f25f422e">autoResetEvent</a>.Set();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ae0622c55ef8fa938c7d366e720a49a81"></a><!-- doxytag: member="StateForge::Examples::Door::Door::Test01" ref="ae0622c55ef8fa938c7d366e720a49a81" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void StateForge::Examples::Door::Door::Test01 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00070">70</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>
<div class="fragment"><pre class="fragment">        {
            this.Start();
            this.OpenRequest();
            this.Quit();
            <a class="code" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1f63da8ffc39975ec290adf9f25f422e">autoResetEvent</a>.WaitOne();
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a1f63da8ffc39975ec290adf9f25f422e"></a><!-- doxytag: member="StateForge::Examples::Door::Door::autoResetEvent" ref="a1f63da8ffc39975ec290adf9f25f422e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AutoResetEvent <a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a1f63da8ffc39975ec290adf9f25f422e">StateForge::Examples::Door::Door::autoResetEvent</a> = new AutoResetEvent(false)<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00042">42</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>

</div>
</div>
<a class="anchor" id="a8f4f3768a854bdda9a25565fa01f54c9"></a><!-- doxytag: member="StateForge::Examples::Door::Door::context" ref="a8f4f3768a854bdda9a25565fa01f54c9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DoorContext <a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a8f4f3768a854bdda9a25565fa01f54c9">StateForge::Examples::Door::Door::context</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00039">39</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>

</div>
</div>
<a class="anchor" id="a76d3290272d4dd3b9de99eff19efee1a"></a><!-- doxytag: member="StateForge::Examples::Door::Door::Engine" ref="a76d3290272d4dd3b9de99eff19efee1a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="interface_state_forge_1_1_examples_1_1_door_1_1_i_engine.html">IEngine</a> <a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a76d3290272d4dd3b9de99eff19efee1a">StateForge::Examples::Door::Door::Engine</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00037">37</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>

</div>
</div>
<a class="anchor" id="a24d411751e88c5c040dbe8e8871b08b8"></a><!-- doxytag: member="StateForge::Examples::Door::Door::traceName" ref="a24d411751e88c5c040dbe8e8871b08b8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">readonly string <a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a24d411751e88c5c040dbe8e8871b08b8">StateForge::Examples::Door::Door::traceName</a> = &quot;Door&quot;<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00040">40</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>

</div>
</div>
<a class="anchor" id="a4f2f10ac2ce1457df395fd9411326eed"></a><!-- doxytag: member="StateForge::Examples::Door::Door::ts" ref="a4f2f10ac2ce1457df395fd9411326eed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TraceSource <a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a4f2f10ac2ce1457df395fd9411326eed">StateForge::Examples::Door::Door::ts</a> = new TraceSource(<a class="el" href="class_state_forge_1_1_examples_1_1_door_1_1_door.html#a24d411751e88c5c040dbe8e8871b08b8">traceName</a>)<code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_door_8cs_source.html#l00041">41</a> of file <a class="el" href="_door_8cs_source.html">Door.cs</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_door_8cs_source.html">Door.cs</a></li>
</ul>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
